//
//  NKMyCollectionController.m
//  NiKi
//
//  Created by qiang chen on 16/6/27.
//  Copyright © 2016年 qiang chen. All rights reserved.
//

#import "NKMyCollectionController.h"
#import "NKMyCollectionCell.h"

@interface NKMyCollectionController ()<UITableViewDataSource,UITableViewDelegate>{
    
    __weak IBOutlet UITableView *_table;
}

@end

@implementation NKMyCollectionController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.navigationItem.title = @"我的收藏";
    self.view.layer.contents = (id)[UIImage imageNamed:@"背景底图"].CGImage;
    
    [self setupRightBtn];
    [_table registerNib:[UINib nibWithNibName:NSStringFromClass([NKMyCollectionCell class]) bundle:nil] forCellReuseIdentifier:myCollectionCell];
}

- (void)setupRightBtn {
    UIBarButtonItem *rightBtn = [[UIBarButtonItem alloc]initWithImage:[UIImage imageNamed:@"collect-_icon-delete"] style:UIBarButtonItemStylePlain target:self action:@selector(rightBtnClick:)];
    self.navigationItem.rightBarButtonItem = rightBtn;
}

- (void)rightBtnClick:(UIBarButtonItem *)item {
    
}

- (IBAction)segmentedControlClick:(UISegmentedControl *)sender {
}

#pragma mark - tableDelegate
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return 8;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    NKMyCollectionCell *cell = [tableView dequeueReusableCellWithIdentifier:myCollectionCell];
    return cell;
}

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
    return 90.f;
}

@end
